
body {
  margin: 0;
  font-family: Segoe UI, Tahoma, sans-serif;
}

.Test {
  input, button {
    font: inherit;
  }

  header {
    background-color: rgb(50, 54, 57);
    box-shadow: 0 0 8px rgba(0, 0, 0, .5);
    padding: 20px;
    color: white;

    h1 {
      font-size: inherit;
      margin: 0;
    }
  }

  &__container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 10px 0;
    padding: 10px;

    & > * {
      & > * {
        margin: 10px;
      }
    }

    &__options {
      display: flex;
      flex-basis: 400px;
      flex-grow: 1;
      flex-wrap: wrap;
      margin: 0;

      fieldset {
        border: 1px solid black;
        flex-grow: 1;
        position: relative;
        top: -10px;

        legend {
          font-weight: 600;

          & + * {
            margin-top: 0 !important;
          }
        }

        label {
          font-weight: 600;
          display: block;

          &:not(:first-of-type) {
            margin-top: 1em;
          }
        }

        input[type="checkbox"] + label,
        input[type="radio"] + label {
          font-weight: normal;
          display: inline-block;
          margin: 0;
        }

        form, div {
          &:not(:first-child) {
            margin-top: 1em;
          }

          &:not(:last-child) {
            margin-bottom: 1em;
          }
        }
      }
    }

    &__content {
      display: flex;
      max-width: 100%;
      flex-basis: 420px;
      flex-direction: column;
      flex-grow: 100;
      align-items: stretch;

      &__toc {
        max-width: 100%;
        max-height: 16vh;
        border: 1px solid black;
        overflow: auto;

        .ReactPDF {
          &__Loader, &__Error, &__NoData {
            padding: 20px;
          }
        }
      }

      &__document {
        max-width: 100%;
        max-height: 55vh;
        border: 1px solid black;
        background-color: rgb(82, 86, 89);
        overflow: auto;

        .ReactPDF {
          &__Document {
            display: flex;
            flex-direction: column;
            align-items: center;
          }

          &__Page {
            max-width: calc(~"100% - 2em");
            box-shadow: 0 0 8px rgba(0, 0, 0, .5);
            margin: 1em;
          }

          &__Loader, &__Error, &__NoData {
            padding: 20px;
            color: white;
          }
        }
      }

      &__controls {
        max-width: 100%;
        display: flex;
        margin-top: 1em;
        align-self: center;

        span {
          flex-grow: 1;
          margin: 0 1em;
          text-align: center;
        }

        button {
          width: 80px;
        }
      }

      &__info {
        margin-top: 1em;
      }
    }
  }
}